package com.myqm.service.impl.weixin;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.myqm.dao.weixin.InternaltradetypeDao;
import com.myqm.pojo.weixin.InternalTradetype;
import com.myqm.pojo.weixin.query.QueryInternaltradetype;
import com.myqm.service.weixin.InternaltradetypeService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;

@Service
public class InternaltradetypeServiceImpl implements InternaltradetypeService{

	@Autowired
	public InternaltradetypeDao Internaltradetypedao;
	@Override
	public int delById(Integer id) {
		return Internaltradetypedao.delById(id);
	}

	@Override
	public int save(InternalTradetype record) {
		return Internaltradetypedao.save(record);
	}

	@Override
	public InternalTradetype getById(Integer id) {
		return Internaltradetypedao.getById(id);
	}


	@Override
	public int editById(InternalTradetype record) {
		return Internaltradetypedao.editById(record);
	}

	@Override
	public PageInfo<InternalTradetype> list(QueryInternaltradetype param) {
		 //商品类型仅仅有几个   不分页
		 List<InternalTradetype> datalist = Internaltradetypedao.list();
		 PageInfo<InternalTradetype> p = new PageInfo<InternalTradetype>(datalist);
	 	return p;
	}

}
